<template>
<div class=''>
  <el-button @click="toPrint">打印</el-button>
  <div style="">
    <print :driverInfoData="driverInfoData" id="printId"></print>
  </div>
</div>
</template>

<script>
import print from './print'
export default {
  components: {
    print
  },
  name: 'printDemo',
  data () {
    return {
      driverInfoData: []
    }
  },
  methods: {
    toPrint () {
      this.driverInfoData = [
        {
          relationList: [
            {
              mobilePhone: '15659983569'
            },
            {
              mobilePhone: '15659983569'
            },
            {
              mobilePhone: '15659983569'
            },
            {
              mobilePhone: '15659983569'
            },
            {
              mobilePhone: '15659983569'
            },
            {
              mobilePhone: '15659983569'
            }
          ]
        },
        {
          relationList: [
            {
              mobilePhone: '15659983569'
            }
          ]
        },
        {
          relationList: []
        }
      ]
    }
  }
}
</script>
<style lang='less' scoped>
</style>
